const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const ObjectId = Schema.ObjectId;

const commentSchema = new Schema({
    uid:{
        type:ObjectId,
        ref:'User'
    },
    aid:{
        type:ObjectId,
        ref:'Article'
    },
    content:String,
    time:Date
})
const Comment = mongoose.model('Comment',commentSchema)

module.exports = {
    Comment
}